﻿//
// Created by francklinson on 2021/3/28.
//

#ifndef CPPPRIMERPLUSREADINGCODES_VINTAGEPORT_H
#define CPPPRIMERPLUSREADINGCODES_VINTAGEPORT_H

#include "Port.h"

class VintagePort : public Port // style necessarily = "vintage"
{
private:
    char *nickname{};  // i.e., "The Noble" or "Old Velvet", etc.
    int year{};         // vintage year
public:
    VintagePort();

    VintagePort(const char *br, const char *st, int b, const char *nn, int y);

    VintagePort(const VintagePort &vp); // 复制构造

    ~VintagePort()
    { delete[] nickname; }

    VintagePort &operator=(const VintagePort &vp);

    void Show() const;

    friend ostream &operator<<(ostream &os, const VintagePort &vp);
};

#endif //CPPPRIMERPLUSREADINGCODES_VINTAGEPORT_H
